#ifndef __KOM_CONFIGURE_H__
#define __KOM_CONFIGURE_H__

#include <memory>

#include <QVariant>
#include <QString>

#define CONFIG_PLUGIN_GLOBAL "Global"
#define CONFIG_PLUGIN_GLOBAL_DEBUG "Debug"
#define CONFIG_PLUGIN_GLOBAL_CUSTOMIZE "Customize"
#define CONFIG_PLUGIN_GLOBAL_INTERNAL_REGISTER "Register"

#define CONFIG_PLUGIN_PROBLEM_FEEDBACK "ProblemFeedback"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_JOB_NUM "JobNum"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_NAME_ADDRESS "NameAddress"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_EMAIL "Email"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_CONTACT "ContactInformation"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_PROTOCOL "Protocol"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_DOMAIN "Domain"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_PORT "Port"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_ENABLE_UPLOAD "EnableUpload"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_EXPORT_PATH "ExportPath"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_ENABLE_HISTORY "EnableHistory"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_HISTORY_BUG "HistoryBug"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_HISTORY_BUG_KEY "HistoryBugKey"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_SERVICE_ONLINE "ServiceOnline"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_INTERNAL_USER "InternalUser"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_INTERNAL_PASSWD "InternalPasswd"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_INTERNAL_PASSWD_KEY "InternalPasswdKey"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_INTERNAL_ASSIGNED_TO "AssignedTo"
#define CONFIG_PLUGIN_PROBLEM_FEEDBACK_SUBMIT_FILTER "SubmitFilter"

#define CONFIG_PLUGIN_GENERAL_NAME "Name"
#define CONFIG_PLUGIN_GENERAL_ICON "Icon"

#define CONFIG_PLUGIN_REPLACEMENT_ASSISTANT "ReplacementAssistant"
#define CONFIG_PLUGIN_REPLACEMENT_ASSISTANT_CODE "Code"

#define CONFIG_CHEST_WIN_DATA_MIGRATION "WinDataMigration"
#define CONFIG_CHEST_WIN_DATA_MIGRATION_FIRST_OPEN "FirstOpen"
#define CONFIG_CHEST_WIN_DATA_MIGRATION_READ_DIR_CHILD "ReadDirChild"
#define CONFIG_CHEST_WIN_DATA_MIGRATION_DEBUG_LEVEL "DebugLevel"
#define CONFIG_CHEST_WIN_DATA_MIGRATION_WORK_GROUP "WorkGroup"
#define CONFIG_CHEST_WIN_DATA_MIGRATION_IP "Ip"
#define CONFIG_CHEST_WIN_DATA_MIGRATION_USER "User"

#define CONFIG_CHEST_REMOTE_CONTROL "RemoteControl"
#define CONFIG_CHEST_REMOTE_CONTROL_PROTOCOL_HEADER "ProtocolHeader"
#define CONFIG_CHEST_REMOTE_CONTROL_SERVER_ADDRESS "ServerAddress"
#define CONFIG_CHEST_REMOTE_CONTROL_SERVER_PORT "ServerPort"
#define CONFIG_CHEST_REMOTE_CONTROL_FRPC_PORT "FrpcPort"
#define CONFIG_CHEST_REMOTE_CONTROL_RCT_TECH_NAME "RCTTechName"
#define CONFIG_CHEST_REMOTE_CONTROL_RCT_ALLOW_VIDEO "RCTAllowVideo"
#define CONFIG_CHEST_REMOTE_CONTROL_RCT_VIDEO_PATH "RCTVideoPath"
#define CONFIG_CHEST_REMOTE_CONTROL_RCT_FILE_PATH "RCTFilePath"
#define CONFIG_CHEST_REMOTE_CONTROL_RCU_ALLOW_REMOTE "RCUAllowRemote"
#define CONFIG_CHEST_REMOTE_CONTROL_RCU_FILE_PATH "RCUFilePath"
#define CONFIG_CHEST_REMOTE_CONTROL_HEARTBEAT_LOG_PRINT "HeartbeatLogPrint"

#define CONFIG_DAEMON_SYSTEM_MONITOR "SystemMonitor"
#define CONFIG_DAEMON_SYSTEM_MONITOR_CPU "CpuThreshold"
#define CONFIG_DAEMON_SYSTEM_MONITOR_MEMORY "MemoryThreshold"
#define CONFIG_DAEMON_SYSTEM_MONITOR_TIMER "Timer"
#define CONFIG_DAEMON_SYSTEM_MONITOR_OUTPUT "Output"

#define CONFIG_DEVICE_MANAGER "DeviceControl"
#define CONFIG_DEVICE_MANAGER_PROTOCOL "Protocol"
#define CONFIG_DEVICE_MANAGER_DOMAIN "Domain"

namespace kom
{

class Configure
{
public:
    Configure();
    ~Configure();

    QVariant value(const QString &group, const QString &key, const QVariant &defaultValue = QVariant());
    void setValue(const QString &group, const QString &key, const QVariant &value);

private:
    class Impl;
    std::unique_ptr<Impl> m_impl;
};
} // namespace kom

#endif
